package com.cs.contract.service.impl;

import com.cs.contract.service.CsCodeRulesService;
import com.cs.contract.domain.CsCodeRules;
import com.cs.contract.mapper.CsCodeRulesMapper;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;


/**
 * @Author：zrx
 * @Package：com.cs.service.impl
 * @Project：RuoYi-Cloud
 * @name：CsCodeRulesServiceImpl
 * @Date：2024/11/19 11:45
 * @Filename：CsCodeRulesServiceImpl
 */
@Service
public class CsCodeRulesServiceImpl implements CsCodeRulesService {
    private final CsCodeRulesMapper csCodeRulesMapper;

    public CsCodeRulesServiceImpl(CsCodeRulesMapper csCodeRulesMapper) {
        this.csCodeRulesMapper = csCodeRulesMapper;
    }

    @Override
    public CsCodeRules getCsCodeRulesByTargetForm(String str) {
        return csCodeRulesMapper.getCsCodeRulesByTargetForm(str);
    }

    @Override
    public Integer updateCsCodeRules(CsCodeRules csCodeRules) {
        csCodeRules.setUpdateTime(DateUtils.getNowDate());
        return csCodeRulesMapper.updateCsCodeRules(csCodeRules);
    }
}
